Skip to content

⬆️ chore(lint): update ruff to v0.15.14 and fix PLW0717#77

Merged
gaborbernat merged 2 commits into
mainfrom
pre-commit-ci-update-config
May 27, 2026
Merged

⬆️ chore(lint): update ruff to v0.15.14 and fix PLW0717#77
gaborbernat merged 2 commits into
mainfrom
pre-commit-ci-update-config

Conversation

@pre-commit-ci
Copy link
Copy Markdown
Contributor

@pre-commit-ci pre-commit-ci Bot commented May 25, 2026

Ruff v0.15.14 introduces the PLW0717 rule which flags try clauses exceeding 5 statements. The pre-commit autoupdate bumped ruff and immediately broke CI because four try blocks in the codebase exceeded this threshold.

🔧 Each violation is resolved by extracting the try-body logic into focused helper functions: _is_executable in _discovery.py, _resolve_tk_lib/_query_tk_library in _py_info.py, _resolve_exe in _pep514.py, and push_release/finalize_release in the release script. The refactoring preserves identical runtime behavior while making each try block trivially short.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

pre-commit-ci Bot and others added 2 commits May 25, 2026 16:51
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.15.13 → v0.15.14](astral-sh/ruff-pre-commit@v0.15.13...v0.15.14)
Extract helper functions to keep try clauses under the 5-statement
limit enforced by ruff 0.15.14.
@gaborbernat gaborbernat merged commit 514da9c into main May 27, 2026
16 checks passed
@gaborbernat gaborbernat deleted the pre-commit-ci-update-config branch May 27, 2026 21:08
@gaborbernat gaborbernat changed the title [pre-commit.ci] pre-commit autoupdate ⬆️ chore(lint): update ruff to v0.15.14 and fix PLW0717 May 27, 2026
@gaborbernat gaborbernat added the enhancement New feature or request label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant